package com.yycx.module.bus.client.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;

/**
 * @author zyf
 */

public enum AmountTypeEnum {

    SupplierBond("SupplierBond", "垫付款", "F"),
    CustomBond("CustomBond", "资保金", "ZBJ"),
    OrderCustomBond("OrderCustomBond", "资保金实时收款", "ZBJ"),
    YfkAmount("YfkAmount", "预收款", "YSK"),
    OrderAmount("OrderAmount", "现款", "XK"),
    DepositAmount("DepositAmount", "保证金收款", "D"),
    CbReturn("CbReturn", "退市场保证金", "T"),
    RefundHk("RefundHk", "退客户货款", "T"),
    CustomRefund("CustomRefund", "客户回款", "HK"),
    Invoice("Invoice", "开票税金", "SJ"),
    Refund("Refund", "厂家返款", "FK"),
    SbReturn("SbReturn", "厂家退保证金", "TB"),
    Settle("Settle", "市场结算", "JS"),
    DrugsPlan("DrugsPlan", "药品采购", "C"),
    SettleApply("SettleApply", "结算申请", "JA"),
    DeptSettle("DeptSettle", "部门结算申请", "DA"),
    RefundDeposit("RefundDeposit", "退保证金", "T"),
    Other("Other", "日常费用", "R"),
    Earnestmoney("Earnestmoney", "保证金", "B");

    @EnumValue
    private String code;
    private String name;
    private String prefix;

    AmountTypeEnum(String code, String name, String prefix) {
        this.code = code;
        this.name = name;
        this.prefix = prefix;
    }

    AmountTypeEnum() {

    }

    public static String getName(String code) {
        String v = "";
        for (AmountTypeEnum sendTypeEnum : values()) {
            if (sendTypeEnum.code.equals(code)) {
                v = sendTypeEnum.getName();
                break;
            }
        }
        return v;
    }


    public String getCode() {
        return this.code;
    }

    public String getPrefix() {
        return this.prefix;
    }

    public String getName() {
        return this.name;
    }
}
